use a different variable name for nested loop in bench.c (#80)
authorTony Kelman <tony@kelman.net>
Tue, 26 Jul 2016 21:54:17 +0000 (14:54 -0700)
committerSteven G. Johnson <stevenj@mit.edu>
Tue, 26 Jul 2016 21:54:17 +0000 (17:54 -0400)
and declare it ahead of time to avoid "error: 'for' loop initial declarations are only allowed in C99 mode"

bench/bench.c

index 21685c5bfe960523906820df8c0c6dd9a892a3a2..4932c6d44b0466654e14e56430c83ed61381f757 100644 (file)
@@ -7,7 +7,7 @@
 
 int main(int argc, char **argv)
 {
-        int i;
+        int i, j;
         int options = 0;
         
         for (i = 1; i < argc; ++i) {
@@ -44,7 +44,7 @@ int main(int argc, char **argv)
                  }
                  uint8_t *dest;
                  mytime start = gettime();
-                 for (int i = 0; i < 100; ++i) {
+                 for (j = 0; j < 100; ++j) {
                           utf8proc_map(src, len, &dest, options);
                           free(dest);
                  }